package com.cindata

class WorkflowInstanceStage
{
    Integer executionSequence
    String name
    Boolean canReject = true
    WorkflowInstance instance

    Layout layout

    //static belongsTo = [instance: WorkflowInstance]

    static hasMany = [conditions: WorkflowInstanceCondition, events: WorkflowInstanceEvent, notifications: WorkflowInstanceNotification]

    static mapping = {
        autowire true
    }

    static constraints = {
        executionSequence unique: ['instance'], min: 1, max: 10000
        name unique: ['instance']
        layout nullable: true, blank: true
        canReject nullable: true, blank: true
    }

    static mappedBy = [conditions: 'stage']
}